package 设计模式.h_组合模式;

import java.util.ArrayList;
import java.util.List;

/**
 * @author caihe
 * @date 2023/3/10 11:16
 */
public class University extends EduComposite {
    
    private String name;
    
    public University(String name) {
        this.name = name;
    }

    @Override
    public void print() {
        System.out.println("最屌的大学：" + name);
        for (EduComposite child : getChildren()) {
            child.print();
        }
    }
}
